package ar.com.quickMart.logic;

import java.io.Serializable;
import java.util.List;

public class QuickMartList implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 2437700945006629225L;
	
	private long id;
	private String name;
	private List<Purchasable> items;
	
	private Branch branch;
	private boolean hasPromotions;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}


	public List<Purchasable> getItems() {
		return items;
	}

	public void setItems(List<Purchasable> items) {
		this.items = items;
	}
	
	public Branch getBranch() {
		return branch;
	}

	public void setBranch(Branch branch) {
		this.branch = branch;
	}

	public boolean isHasPromotions() {
		return hasPromotions;
	}

	public void setHasPromotions(boolean hasPromotions) {
		this.hasPromotions = hasPromotions;
	}

	public float getTotalToPay() {
		float total = 0;
		
		for(Purchasable p : items){
			
			total += p.getPrice();
		}
		
		return total;
	}



}
